<?php

require_once("../../controllers/init.php");
require_once($FILE_SYSTEM_ROOT."/controllers/authentication.php");

$personid = 0;
if (isset($_POST['personid']))
	$personid = $_POST['personid'];

$address1 = "";
if (isset($_POST['address1']))
	$address1 = $_POST['address1'];

$address2 = "";
if (isset($_POST['address2']))
	$address2 = $_POST['address2'];

$address3 = "";
if (isset($_POST['address3']))
	$address3 = $_POST['address3'];

$address4 = "";
if (isset($_POST['address4']))
	$address4 = $_POST['address4'];

$postcode = "";
if (isset($_POST['postcode']))
	$postcode = $_POST['postcode'];

$county = "";
if (isset($_POST['county']))
	$county = $_POST['county'];

$country = "";
if (isset($_POST['country']))
	$country = $_POST['country'];

$person = new Person($personid);
// $person->addAddress($addressid);

$address = new Address(0,$address1,$address2,$address3,$address4,$postcode,$county,$country);


$person = new Person($personid);
$person->addAddress($address);

	
?>